// 路由菜单

export const menus = [{
    path: "/index/home",
    name: "home",
    component: () => import("@/views/home/index.vue"),
    text: "首页",
    premession: 1, // 权限 
    icon: "el-icon-s-home"
},
{
    path:"/index/healthy",
    name:"healthy",
    text:"宿舍检查",
    component:()=>import("@/views/healthy/index.vue"),
    icon:"el-icon-s-order",
    redirect:"/index/healthy/tianxie",
    premession:1,
    children:[
        {
            path:"/index/healthy/tianxie",
            name:"tianxie",
            component:()=>import("@/views/healthy/tianxie.vue"),
            text:"查寝情况",
            premession:1,
        },
        {
            path:"/index/healthy/tongji",
            name:"tongji",
            component:()=>import("@/views/healthy/tongji.vue"),
            text:"查寝统计",
            premession:1,
        },
    ]
},
{
    path:"/index/buy",
    name:"buy",
    text:"宿舍小超市",
    component:()=>import("@/views/buybox/index.vue"),
    icon:"el-icon-s-goods",
    redirect:"/index/buy/list",
    premession:1,
    children:[
        {
            path:"/index/buy/list",
            name:"buylist",
            component:()=>import("@/views/buybox/list.vue"),
            text:"商品列表",
            premession:1,
        },
        {
            path:"/index/buy/mygood",
            name:"mygood",
            component:()=>import("@/views/buybox/mygood.vue"),
            text:"我的商品",
            premession:1,
        },
        {
            path:"/index/buy/detail/:goodId",
            name:"gooddetail",
            component:()=>import("@/views/buybox/detail.vue"),
            text:"商品详情",
            premession:1,
            hide:true,
        }
    ]
},
{
    path:"/index/advise",
    name:"advise",
    text:"寝室报修",
    component:()=>import("@/views/advise/index.vue"),
    icon:"el-icon-s-open",
    redirect:"/index/advise/add",
    premession:1,
    children:[
        {
            path:"/index/advise/add",
            name:"adviseadd",
            component:()=>import("@/views/advise/add.vue"),
            text:"报修填写",
            premession:1,
        },
        {
            path:"/index/advise/list",
            name:"adviselist",
            component:()=>import("@/views/advise/list.vue"),
            text:"报修列表",
            premession:1,
        },
        {
            path:"/index/advise/edit/:id",
            name:"adviseedit",
            component:()=>import("@/views/advise/edit.vue"),
            text:"报修编辑",
            premession:1,
            hide:true,
        },
        {
            path:"/index/advise/reply/:id",
            name:"advisereply",
            component:()=>import("@/views/advise/reply.vue"),
            text:"报修回复",
            premession:1,
            hide:true,
        },
        
    ]
},
{
    path: "/index/user",
    name: "user",
    text: "学生管理",
    component: () => import("@/views/user/index.vue"),
    icon: "el-icon-s-custom",
    redirect:"/index/user/list",
    premession: 3,
    children: [{
            path: "/index/user/list",
            name: "userlist",
            component:()=>import("@/views/user/list.vue"),
            text: "学生列表",
            premession: 3,
        },
        {
            path: "/index/user/add",
            name: "useradd",
            component:()=>import("@/views/user/add.vue"),
            text: "学生新增",
            premession: 3,
        }
    ]
},
]